#ifndef __SCENE_MANAGER_H__
#define __SCENE_MANAGER_H__
#include <scene.h>
#include <string>
#include <string_view>
#include <filesystem>

class SceneManager {
public:
    using iterator = std::vector<Scene>::iterator;
    using const_iterator = std::vector<Scene>::const_iterator;
public:
    SceneManager() = default;

    void createScene(const std::filesystem::path& path);

    void draw(Framebuffer& framebuffer, const Vec3f& cameraPos) {
        mScenes[mCurrentSceneIndex].draw(framebuffer, cameraPos);
    }
private:
    Scene parseScene(std::ifstream& infile) const;
    Model parseModel(std::istream& stream) const;
    std::shared_ptr<Light> parseLight(std::istream& stream) const;
private:
    int mCurrentSceneIndex = 0;
    std::filesystem::path mParentPath;
    std::vector<Scene> mScenes;
};

#endif